package org.hzz.promotions.types.enums.code;

import io.gitee.pkmer.convention.enums.BaseEnum;
import io.gitee.pkmer.convention.enums.BaseEnumTemplate;
import lombok.Getter;

/**
 * @author <a href="mailto:1193094618@qq.com">pkmer</a>
 * <br>
 * <a href = "https://gitee.com/developeros/videos-online">Code Repository</a>
 * At 2024/9/2
 */
@Getter
public enum UserCouponStatus implements BaseEnum<Integer> {
    /**
     * 优惠券状态，1：未使用，2：已使用，3：已失效
     */
    UNUSED(1,"未使用"),
    USED(2,"已使用"),
    INVALIDATION(3,"已失效");

    private final Integer value;
    private final String desc;

    UserCouponStatus(Integer value,String desc){
        this.value = value;
        this.desc = desc;
    }

    public static UserCouponStatus fromValue(Byte value){
        return BaseEnumTemplate.fromByteValue(UserCouponStatus.class,value);
    }
}
